home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 352_01.zip / VECZNORM.CPP < prev    next >
C/C++ Source or Header  |  1993-04-10  |  591b  |  23 lines

  1. //////// COMPLEX VECTORS
  2. //
  3. // VECZNORM.CPP
  4. //        norm  of a complex vector = sum of norms of complex elements
  5. //        also equals sum of norms of real and imag vector parts.
  6. //
  7. #include <stdlib.h>
  8. #include <alloc.h>
  9. #include <string.h>
  10. #include "wtwg.h"
  11.  
  12. #include "dblib.h"
  13.  
  14. #include "vector.h"
  15.  
  16. float norm (CVector& vec,  int n1, int n2 )
  17.     // norm between point1 and point2    (friend function of CVector)
  18.     // if point2 == -1, sums to end of V.
  19.         {
  20.         return ( norm(vec.x,n1,n2) + norm(vec.y,n1,n2) );
  21.         }
  22. //---------------------- end VECZNORM.CPP ----------------------------
  23.